<%-- 
    Document   : listTour
    Created on : Nov 2, 2011, 12:15:47 AM
    Author     : Mr-aUgust
--%>

<%@page pageEncoding="UTF-8"%>
<%@ page session="true" import="java.util.Collection, DAL.*" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="/WEB-INF/taglib139.tld" prefix="pg" %>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>East2West Tours and Travels</title>
        <style type="text/css">
            a:link {
            text-decoration: none;
            }
            a:visited {
            text-decoration: none;
            }
            a:hover {
            text-decoration: underline;
            }
            a:active {
            text-decoration: none;
            }
             #paging{
                    
                    clear: both;
                    font-size: 12px;
                    padding-top: 10px;
                    padding-left: 200px;
                }
        </style>
    </head>
    <%
    String user="";
    if(session.getAttribute("User")!=null) {
        user=(String)session.getAttribute("User");
    } 
    %>
    
    <%      
    TourPackageBean tourPack=new TourPackageBean();
    Collection coll=tourPack.getAllTourPackage();
    request.setAttribute("tourPack",coll);  
    
    %>    
    <body>      <center>
                <span style="font-size: 20px;color: #343434;">List Tours</span></center>  
            <pg:paging pageSize="4" url="index.jsp?page=listTour">    
                <c:forEach items="${tourPack}" var="tp">  
                    <pg:item>
                        <table width="490px" >    
                        <tr>
                            <td align="left">
                                <table border="0" align="left" style="background-color:#f7f6f6;" cellspacing="5">
                                    <tr>                                     
                                        <td valign="top">  
                                            <img src="${tp.image}" width="120px" height="120px" title="" align="left" style="padding-right: 5px;padding-bottom: 5px;"/>
                                                <a href="ControllerViewTour?tourID=${tp.tourID}">
                                                    <strong>${tp.tourName}</strong>
                                                </a>	
                                                
                                                <br>
                                                ${tp.state}
                                                                  
                                            
                                            <table border="0" align="right" cellpadding="0">
                                                <tr>
                                                    <td align="right" valign="top">                                                     
                                                      <a href='ControllerViewTour?tourID=${tp.tourID}' style="border:none;height:16px;padding-bottom:2px;text-align:center;margin:0px 10px;font-size:12px;background-image:url(skinImgTuor/btnSmall.jpg);color:black;">View more....</a>
                                                     </td>
                                                    <td valign="top"> 
                                                        <form action="index.jsp?page=BookTour" method="post" name="bookt">
                                                            <input type="hidden" name="idTour" value="${tp.tourID}"/>
                                                            <input type="hidden" name="name" value="${tp.tourName}"/>
                                                            <input type="hidden" name="ap" value="${tp.adultPrice}"/>
                                                            <input type="hidden" name="cp" value="${tp.childPrice}"/>                                                  
                                                            <input type="submit" name="Submit" value="Book here" style="border:none;width:70px;heighht:16px;padding-bottom:2px;text-align:center;margin:0px 10px;font-size:12px;background-image:url(skinImgTuor/btnSmall.jpg);color:black;"/>
                                                        </form>
                                                    </td>
                                                </tr>
                                            </table>                                           
                                                                                      
                                        </td>
                                    </tr>
                                </table>
                                
                            </td>
                        </tr>
                        </table>
                    </pg:item>       
                </c:forEach>                           
    <div id="paging">
        <pg:index>
          <pg:page><%=thisPage%></pg:page>
        </pg:index>
        </div>
    </pg:paging>
            
    </body>    
    </html>